package com.betterwood.dragon.enums;

/**
 * //1还未值机，2开始值机，3值机结束，4开始登机，5催促登机，6登机结束
 */
public enum UserFilightStatusEnum {

    NO_CHECKINTABLE("还未值机",1),
    CHECKINTABLING("开始值机",2),
    CHECKINTABLE_OVER("值机结束",3),
    BOARDING("开始登机",4),
    URGE_BOARD ("催促登机",5),
    BOARD_OVER("登机结束",6);

    private String name;

    private Integer value;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    UserFilightStatusEnum(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    //枚举方法
    public static String getYsOrderStatusEnumName(int index){
        for(UserFilightStatusEnum c : UserFilightStatusEnum.values()){
            if(c.getValue()==index){
                return c.getName();
            }
        }
        return null;
    }


    //枚举方法
    public static int getYsOrderStatusEnumIndex(String name){
        for(UserFilightStatusEnum c : UserFilightStatusEnum.values()){
            if(c.getName().equals(name)){
                return c.getValue();
            }
        }
        return -1;
    }
}
